package com.koron.order.zsjRepair.mapper;

import com.koron.order.defect.bean.vo.DefectVO;
import com.koron.order.zsjRepair.bean.RecordFile;
import com.koron.order.zsjRepair.bean.RemoteRecord;
import com.koron.order.zsjRepair.bean.StepFile;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ZsjMapper {

	List<String> queryOrderByWorker(@Param("worker") String worker, @Param("is_out") int is_out);

	List<DefectVO> queryOrderByIdsWithStatuInExcute(@Param("orderIds") List<String> orderIds);

	List<DefectVO> queryRepairOrderByName(@Param("orderIds") List<String> orderIds, @Param("title")String title);

	String getDeviceTypeByOrderId(@Param("id") String id);

	Integer selectByOrderAndCard(@Param("projectId") String projectId,@Param("cardId") String cardId);

	Integer saveRemoteRecord(@Param("record") RemoteRecord record);

	Integer saveRemoteStepFiles(@Param("projectId") String projectId, @Param("stepFiles")List<StepFile> stepFiles,@Param("type") String type);

	Integer saveRemoteRecordFile(@Param("projectId") String projectId,
	                             @Param("cardId") String cardId,
	                             @Param("recordFiles") List<RecordFile> recordFiles,
	                             @Param("type") String type);

	List<RemoteRecord> SelectCardIdWithRecord(@Param("orderId") String orderId);

	List<StepFile> SelectStep(@Param("cardId") String cardId,@Param("orderId") String orderId ,@Param("type") String type);

	List<RecordFile> SelectRecordFile(@Param("cardId") String cardId,@Param("orderId") String orderId, @Param("type") String type);

	Integer deleteStepFileWithRemote(@Param("fileId") String fileId);

	Integer deleteFileWithRemoteById(@Param("cardId")String cardId, @Param("projectId") String projectId);

	Integer deleteStepFileWithRemoteById(@Param("cardId")String cardId, @Param("projectId") String projectId);
}
